<template>
	<view class="zaiui-login-content">
		<view class="logo-view">
			<image class="logo" src="/static/icon.png" mode="widthFix"></image>
		</view>
		<view class="content">
			<view class="title-h">您好,</view>
			<view class="introduce">欢迎使用，记得五星好评哦~</view>
			<input class="phone-input" placeholder="请输入邮箱" maxlength="25" v-model="email" />
		</view>
		<view class="foot-view">
			<view class="zaiui-btn-view">
				<button class="zaiui-btn" @tap="tapBtn">获取验证码</button>
			</view>
			<view class="font-tag-view">
				<text class="font-tag" @tap="tapLogin">密码登录</text>
				<text class="font-tag" @click="register">账号注册</text>
			</view>
		</view>
	</view>
</template>

<script>
	import apis from '@/api/index.js'
	import {
		requestApi
	} from '@/utils/request.js'
	import {
		isEmail
	} from '@/utils/validate.js'
	// 导入公共组件方法
	import common from '@/common/js/common.js';
	export default {
		mixins: [common],
		data() {
			return {
				email: ""
			}
		},
		onLoad() {

		},
		methods: {
			tapBtn() {
				if (isEmail(this.email)) {
					uni.navigateTo({
						url: '/pages/login/code?email=' + this.email
					});
				} else {
					uni.showToast({
						icon: 'none',
						title: "请正确输入邮箱"
					})
				}
			},
			tapLogin() {
				uni.navigateTo({
					url: '/pages/login/login'
				});
			},
			register() {
				uni.navigateTo({
					url: '/pages/login/register'
				});
			}
		}
	}
</script>

<style lang="less" scoped>
	@import url('@/static/zaizai/app.less');

	page {
		background-color: #fff;
	}
	.zaiui-login-content{
		background-image: url("../../static/bgc.png");
		min-height: 100vh;
		background-size: 100% 100%;
		background-repeat: no-repeat;
	}
	.logo{
		width: 180rpx;
		height: 180rpx;
	}
</style>